from django.urls import path
from . import views

urlpatterns = [
    path('login/', views.login_view, name='login'),
    path('register/', views.register_view, name='register'),
    path('logout/', views.logout_view, name='logout'),
    path('verify-code/', views.verify_code, name='verify_code'),
    path('verify-email/<uuid:token>/', views.verify_email, name='verify_email'),
    path('check-verification/', views.check_verification_status, name='check_verification'),
    path('resend-verification/', views.resend_verification, name='resend_verification'),
    path('profile/', views.profile_view, name='profile'),
    path('change-password/', views.change_password, name='change_password'),
    
    # 忘记密码相关路由
    path('forgot-password/', views.forgot_password, name='forgot_password'),
    path('verify-reset-code/<str:email>/', views.verify_reset_code, name='verify_reset_code'),
    path('reset-password/<str:email>/<str:token>/', views.reset_password, name='reset_password'),
    
    # 地址管理路由
    path('address/add/', views.add_address, name='add_address'),
    path('address/<int:address_id>/', views.get_address, name='get_address'),
    path('address/<int:address_id>/edit/', views.edit_address, name='edit_address'),
    path('address/<int:address_id>/set-default/', views.set_default_address, name='set_default_address'),
    path('address/<int:address_id>/delete/', views.delete_address, name='delete_address'),
    path('addresses/get/', views.get_all_addresses, name='get_all_addresses'),
]